import Loadable from 'react-loadable';
import Loading from '../view/Loading'
import Login from "../components/Login";
import NotFound from "../components/pages/NotFound";


/*面板*/
const Dashboard = Loadable({loader: () => import('../components/Dashboard'), loading: Loading});
const Ums = Loadable({loader: () => import('../components/Ums'), loading: Loading});
const Cms = Loadable({loader: () => import('../components/Cms'), loading: Loading});
const WeChatMs = Loadable({loader: () => import('../components/WeChatMs'), loading: Loading});
const WeiXinUms = Loadable({loader: () => import('../components/WeiXinUms'), loading: Loading});

export const mainRouter = [
    {
        path: '/login',
        component: Login,
    },
    {
        path: '/404',
        component: NotFound
    }
];

export const routeList = [
    {key: '/app/dashboard', path: "/app/dashboard", title: "首页", component: Dashboard,},
    {key: '/app/ums', path: "/app/ums", component: Ums, title: "用户管理",},
    {key: '/app/cms', path: "/app/cms", component: Cms, title: "内容管理",},
    {key: '/app/weiXinMs', path: "/app/weiXinMs", component: WeChatMs, title: "公众号管理",},
    {key: '/app/wx/WeiXinUms', path: "/app/wx/WeiXinUms", component: WeiXinUms, title: "用户管理",},

];
